<?php
/**
 * Created by PhpStorm.
 * User: chenzhitao
 * Date: 2018/4/20
 * Time: 上午9:57
 */

namespace App\Busi\Modules\Resource;

use App\Busi\Modules\BaseBusi;
use App\Http\Requests\ImgUploadRo;
use Illuminate\Http\Request;
use Storage;
class ImgUploadBusi extends BaseBusi
{
    public function handle(Request $ro){

        $img = $ro->file("file");


//        $host = 'http://shineconnt.oss-cn-shenzhen.aliyuncs.com/';
        $host = config("admin.upload.host");
        $name =  Storage::put("",$img);
        $path = $host.$name;
        $data = [
            "url"=>$path
        ];



        return $data;


    }
}